package reflect;
//jdk5之后新特性:变长
public class ArgsDemo {
    public static void main(String[] args) {
        //变长参数只能是最后一个参数!
        //变长参数是编译器认可的,最终编译后变成数组
        doSome(1);
        doSome(1,"one");
        doSome(1,"one","two");
        doSome(1,"one","two","three");
        doSome(1,"one","two","three","for");
        doSome(1,"one","two","three","for","five");

    }
    public static void doSome(int a,String...args){
        System.out.println(args.length);
    }
}
